package com.atguigu.srb.core.service;

import com.atguigu.srb.core.pojo.entity.UserInfo;
import com.atguigu.srb.core.pojo.vo.UserInfoPageVO;
import com.atguigu.srb.core.pojo.vo.UserLoginVO;
import com.atguigu.srb.core.pojo.vo.UserRegisterVO;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 * 用户基本信息 服务类
 * </p>
 *
 * @author Atguigu
 * @since 2024-04-15
 */
public interface UserInfoService extends IService<UserInfo> {

    void register(UserRegisterVO userRegisterVO);

    String login(UserLoginVO userLoginVO, HttpServletRequest request);
    void saveLoginLogs(HttpServletRequest request, UserInfo userInfo,Integer loginType);

    Page<UserInfo> selectPage(UserInfoPageVO userInfoPageVO, Page<UserInfo> userInfoPage);

    Boolean isBindMobile(String token);

    void updateMobileAndType(String token,UserLoginVO userLoginVO);
    Boolean isMobileUsed(String mobile);
    UserInfo checkUserBaseInfo(String token);
    UserInfo getUserInfoByToken(String token);
}
